<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="css/pintuer.css">
  <link rel="stylesheet" href="css/admin.css">
  <link rel="stylesheet" href="../layui/css/layui.css"  media="all">
  <script src="../layui/layui.js"></script>
  <script src="js/jquery.js"></script>
  <script src="js/pintuer.js"></script>
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
	<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder">角色列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>

    <table class="table table-hover text-center">  
      <tr>
        <th width="100" style="text-align:left; padding-left:20px;">ID</th>
        <th width="10%">角色</th>

        <th width="310">操作</th>
      </tr>
      <volist name="list" id="vo">
        <tr>
          <td style="text-align:left; padding-left:20px;"><input type="checkbox" name="id[]" value="" />
           1</td>
          <td>教师</td>
          <td><div class="button-group"><a class="button border-main" href="userChange.html"><span class="icon-edit"></span>权限调整</a> </div></td>
        </tr>

      <tr>
        <td colspan="9"><div class="pagelist"> <a href="">上一页</a> <span class="current">1</span><a href="">2</a><a href="">3</a><a href="">下一页</a><a href="">尾页</a> </div></td>
      </tr>
    </table>
  </div>
</form>

       <!--<div>
    <h1 style="float: left;margin-left:30px">用户角色</h1>
    <h1 style="loat: right;margin-left:500px">角色功能</h1>

    <div>

        <div id="test9" class="demo-tree demo-tree-box" style="float: left;margin-left:30px"></div>
    </div>
    <div >

        <div id="test12" class="demo-tree-more" style="float: right;margin-right: 700px"></div>
    </div>
	</div>
-->

</body>
<script>
    layui.use(["tree"], function(){
        var tree = layui.tree
            ,layer = layui.layer
            //模拟数据
            ,data = [{
                title: '仓库管理'
                ,id: 1
                ,field: 'name1'
                ,children: [{
                    title: '质检单'
                    ,id: 3
                    ,field: 'name11'
                ,children:[{
                        title:'增加',
                        id:30,
                        field:''
                    },
                        {
                            title:'删除',
                            id:31,
                            field:''
                    },{
                            title:'修改',
                            id:32,
                            field:''
                        },{
                            title:'查询',
                            id:33,
                            field:''
                        }
                    ]
                },{
                    title: '调拨单'
                    ,id: 4
                    ,children:[{
                        title:'增加',
                        id:34,
                        field:''
                    },
                        {
                            title:'删除',
                            id:35,
                            field:''
                        },{
                            title:'修改',
                            id:36,
                            field:''
                        },{
                            title:'查询',
                            id:37,
                            field:''
                        }
                    ]
                },{
                    title: '盘点'
                    ,id: 20
                    ,field: ''
                    ,children:[{
                        title:'增加',
                        id:38,
                        field:''
                    },
                        {
                            title:'删除',
                            id:39,
                            field:''
                        },{
                            title:'修改',
                            id:40,
                            field:''
                        },{
                            title:'查询',
                            id:41,
                            field:''
                        }
                    ]
                },
                    {
                        title: '入库单'
                        ,id: 101
                        ,field: ''
                        ,children:[{
                            title:'增加',
                            id:42,
                            field:''
                        },
                            {
                                title:'删除',
                                id:43,
                                field:''
                            },{
                                title:'修改',
                                id:44,
                                field:''
                            },{
                                title:'查询',
                                id:45,
                                field:''
                            }
                        ]
                    },{
                        title: '出库单'
                        ,id: 102
                        ,field: ''
                        ,children:[{
                            title:'增加',
                            id:46,
                            field:''
                        },
                            {
                                title:'删除',
                                id:47,
                                field:''
                            },{
                                title:'修改',
                                id:48,
                                field:''
                            },{
                                title:'查询',
                                id:49,
                                field:''
                            }
                        ]
                    },{
                        title: '库存余额'
                        ,id: 103
                        ,field: ''
                        ,children:[{
                            title:'增加',
                            id:50,
                            field:''
                        },
                            {
                                title:'删除',
                                id:51,
                                field:''
                            },{
                                title:'修改',
                                id:52,
                                field:''
                            },{
                                title:'查询',
                                id:53,
                                field:''
                            }
                        ]
                    }
                ]
            },{
                title: '资金管理'
                ,id: 2
                ,field: ''
                ,children: [{
                    title: '收款单'
                    ,id: 5
                    ,field: ''
                    ,spread: true
                    ,children:[{
                        title:'增加',
                        id:54,
                        field:''
                    },
                        {
                            title:'删除',
                            id:55,
                            field:''
                        },{
                            title:'修改',
                            id:56,
                            field:''
                        },{
                            title:'查询',
                            id:57,
                            field:''
                        }
                    ]
                },{
                    title: '付款单'
                    ,id: 6
                    ,field: ''
                    ,children:[{
                        title:'增加',
                        id:58,
                        field:''
                    },
                        {
                            title:'删除',
                            id:59,
                            field:''
                        },{
                            title:'修改',
                            id:60,
                            field:''
                        },{
                            title:'查询',
                            id:61,
                            field:''
                        }
                    ]
                },{
                    title:'核销单',
                     id:7
                    ,field: ''
                    ,children:[{
                        title:'增加',
                        id:62,
                        field:''
                    },
                        {
                            title:'删除',
                            id:63,
                            field:''
                        },{
                            title:'修改',
                            id:64,
                            field:''
                        },{
                            title:'查询',
                            id:65,
                            field:''
                        }
                    ]
                },{
                    title:'采购销售费用清单',
                    id:800
                    ,field: ''
                    ,children:[{
                        title:'增加',
                        id:66,
                        field:''
                    },
                        {
                            title:'删除',
                            id:67,
                            field:''
                        },{
                            title:'修改',
                            id:68,
                            field:''
                        },{
                            title:'查询',
                            id:69,
                            field:''
                        }
                    ]
                },{
                    title:'客户对账单',
                    id:801
                    ,field: ''
                    ,children:[{
                        title:'增加',
                        id:70,
                        field:''
                    },
                        {
                            title:'删除',
                            id:71,
                            field:''
                        },{
                            title:'修改',
                            id:72,
                            field:''
                        },{
                            title:'查询',
                            id:73,
                            field:''
                        }
                    ]
                },{
                    title:'供应商对账单',
                    id:802
                    ,field: ''
                    ,children:[{
                        title:'增加',
                        id:74,
                        field:''
                    },
                        {
                            title:'删除',
                            id:75,
                            field:''
                        },{
                            title:'修改',
                            id:76,
                            field:''
                        },{
                            title:'查询',
                            id:77,
                            field:''
                        }
                    ]
                },{
                    title:'应收账款明细表',
                    id:803
                    ,field: ''
                    ,children:[{
                        title:'查询',
                        id:78,
                        field:''
                    }
                    ]
                }
                ,{
                        title:'应付账款明细表',
                        id:804
                        ,field: ''
                        ,children:[{
                            title:'查询',
                            id:79,
                            field:''
                        }
                        ]
                    },{
                        title:'其他明细表',
                        id:805
                        ,field: ''
                        ,children:[{
                            title:'查询',
                            id:80,
                            field:''
                        }
                        ]
                    }
                ]
            },{
                title: '采购管理'
                ,id: 16
                ,field: ''
                ,children: [{
                    title: '购货单'
                    ,id: 17
                    ,field: ''
                    ,fixed: true
                ,children:[{
                        title:'增加',
                        id:201,
                        field:''
                    },
                        {
                            title:'删除',
                            id:202,
                            field:''
                        },{
                            title:'修改',
                            id:203,
                            field:''
                        },{
                            title:'查询',
                            id:204,
                            field:''
                        }
                    ]
                },{
                    title: '购货退货单'
                    ,id: 27
                    ,field: ''
                ,children:[{
                        title:'增加',
                        id:205,
                        field:''
                    },
                        {
                            title:'删除',
                            id:206,
                            field:''
                        },{
                            title:'修改',
                            id:207,
                            field:''
                        },{
                            title:'查询',
                            id:208,
                            field:''
                        }
                    ]
                }
                ]
            },{
                title: '加工管理'
                ,id: 300
                ,field: ''
                ,children: [{
                    title: '加工配料需求单'
                    ,id: 301
                    ,field: ''
                    ,fixed: true
                    ,children:[{
                        title:'增加',
                        id:304,
                        field:''
                    },
                        {
                            title:'删除',
                            id:305,
                            field:''
                        },{
                            title:'修改',
                            id:306,
                            field:''
                        },{
                            title:'查询',
                            id:307,
                            field:''
                        }
                    ]
                },{
                    title: '加工任务单'
                    ,id: 302
                    ,field: ''
                    ,fixed: true
                    ,children:[{
                        title:'增加',
                        id:308,
                        field:''
                    },
                        {
                            title:'删除',
                            id:309,
                            field:''
                        },{
                            title:'修改',
                            id:310,
                            field:''
                        },{
                            title:'查询',
                            id:311,
                            field:''
                        }
                    ]
                },{
                    title: '配料消耗详情单'
                    ,id: 303
                    ,field: ''
                    ,fixed: true
                    ,children:[{
                        title:'增加',
                        id:312,
                        field:''
                    },
                        {
                            title:'删除',
                            id:313,
                            field:''
                        },{
                            title:'修改',
                            id:314,
                            field:''
                        },{
                            title:'查询',
                            id:315,
                            field:''
                        }
                    ]
                }
                ]
            },{
                title: '用户管理'
                ,id: 316
                ,field: ''
                ,children:[{
                    title:'增加',
                    id:317,
                    field:''
                },
                    {
                        title:'删除',
                        id:318,
                        field:''
                    },{
                        title:'修改',
                        id:319,
                        field:''
                    },{
                        title:'查询',
                        id:320,
                        field:''
                    }
                ]
             },{
                title: '商品管理'
                ,id: 321
                ,field: ''
                ,children:[{
                    title:'商品列表',
                    id:322,
                    field:''
                ,children:[{
                        title: '增加',
                        id: 324,
                        field: ''
                    },{
                        title: '修改',
                        id: 325,
                        field: ''
                    },{
                        title: '删除',
                        id: 326,
                        field: ''
                    },{
                        title: '查询',
                        id: 328,
                        field: ''
                    }
                    ]
                },{
                    title:'商品分类列表',
                    id:323,
                    field:''
                ,children:[{
                        title: '增加',
                        id: 329,
                        field: ''
                    },{
                        title: '修改',
                        id: 330,
                        field: ''
                    },{
                        title: '删除',
                        id: 331,
                        field: ''
                    },{
                        title: '查询',
                        id: 332,
                        field: ''
                    }
                    ]
                }
                ]
             },
            ],data1=[{
                title: '老板'
                ,id: 1
                ,children: [{
                    title: '小白'
                    ,id: 1000
                }]
            },{
                title: '采购'
                ,id: 2
                ,children: [{
                    title: '采购员'
                    ,id: 2000
                }
                ]
            },{
                title: '财务'
                ,id: 3
                ,children: [{
                    title: '财务人员'
                    ,id: 3001
                }
                ]
            },
                {
                    title: '仓管'
                    ,id: 4
                    ,children: [{
                        title: '仓管员'
                        ,id: 3002
                    }
                    ]
                },{
                    title: '加工'
                    ,id: 5
                    ,children: [{
                        title: '加工人员'
                        ,id: 3003
                    }
                    ]
                },{
                    title: '管理员'
                    ,id: 4
                    ,children: [{
                        title: '管理人员'
                        ,id: 3004
                    }
                    ]
                },{
                    title: '销售'
                    ,id: 5
                    ,children: [{
                        title: '销售员'
                        ,id: 3005
                    }
                    ]
                }
            ]
        //基本演示
        tree.render({
            elem: '#test12'
            ,data: data
            ,showCheckbox: true  //是否显示复选框
            ,id: 'demoId1'
            ,isJump: true //是否允许点击节点时弹出新窗口跳转
            ,click: function(obj){
                var data = obj.data;  //获取当前点击的节点数据
                layer.msg('状态：'+ obj.state + '<br>节点数据：' + JSON.stringify(data));
            }
        });
        //开启节点操作图标
        tree.render({
            elem: '#test9'
            ,data: data1
            ,edit: ['add', 'update', 'del'] //操作节点的图标
            ,click: function(obj){
                layer.msg(JSON.stringify(obj.data));
            }
        });
    });
</script>
</body>